package com.wangsd.web.face.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 订单
 */
@Data
@Entity
@Table(name = "deposit")
@ApiModel(value = "押金退还", description = "押金退还信息")
public class Deposit implements Serializable {

    @Id
    @TableId(type = IdType.AUTO)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    @ApiModelProperty(value = "检索标识")
    private String code;

    @ApiModelProperty(value = "交易订单号")
    private String transactionId;

    @ApiModelProperty(value = "押金退还状态：0：未退，1：成功，2，失败")
    @Column(name = "deposit_status",columnDefinition = "int(2) default 0 not null")
    private Integer depositStatus;

    @ApiModelProperty(value = "服务商id")
    private Long businessServiceId;

    @ApiModelProperty(value = "代理商id")
    private Long agentId;

    @ApiModelProperty(value = "商户id")
    private Long merchantId;

    @ApiModelProperty(value = "商户名称")
    private String merchantName;

    @ApiModelProperty(value = "门店id")
    private Long storeId;

    @ApiModelProperty(value = "门店名称")
    private String storeName;

    @ApiModelProperty(value = "门店店员id")
    private Long storeUserId;

    @ApiModelProperty(value = "用户在子商户appid下的唯一标识")
    private String openid;

    @ApiModelProperty(value = "押金金额")
    @Column(name = "deposit_fee",columnDefinition = "int(20) default 0 not null")
    private Long depositFee;

    @ApiModelProperty(value = "退押金单号")
    private String outRefundNo;

    @ApiModelProperty(value = "微信退押金单号")
    private String refundId;

    @ApiModelProperty(value = "微信退款入账账户")
    private String refundRecvAccout;

    @ApiModelProperty(value = "微信完成支付时间")
    private String timeEnd;

    @ApiModelProperty(value = "设备编号")
    private String deviceNo;

    @ApiModelProperty(value = "开始时间")
    @Transient
    @TableField(exist = false)
    private String beginTime;

    @ApiModelProperty(value = "结束时间")
    @Transient
    @TableField(exist = false)
    private String endTime;

}
